package jmine.tec.test.metric.performance;

import com.thoughtworks.xstream.annotations.XStreamAlias;

/**
 * Representa a tag result no xml de performance deve conter um ResultSuccess.
 * 
 * @author bruno.ortiz
 */
@XStreamAlias("result")
public class Result {

    private ResultSuccess success;

    private Performance performance;

    /**
     * Construtor.
     * 
     * @param success uma tag success.
     */
    public Result(ResultSuccess success) {
        if (success == null) {
            throw new IllegalStateException();
        }
        this.success = success;
    }

    /**
     * Construtor.
     * 
     * @param success uma tag success.
     * @param performance uma tag performance
     */
    public Result(ResultSuccess success, Performance performance) {
        this(success);
        this.performance = performance;
    }

    /**
     * @return the success
     */
    public ResultSuccess getSuccess() {
        return this.success;
    }

    /**
     * @return the performance
     */
    public Performance getPerformance() {
        return this.performance;
    }

}
